home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio
/
Ham Radio CD-ROM (Emerald Software) (1995).ISO
/
misc
/
ham436
/
oscar.bas
< prev
next >
Wrap
BASIC Source File
|
1985-05-09
|
4KB
|
111 lines
10 CLS:REM DEVELOPED BY K1CD MODIFIED BY WB5MPU
20 DEFDBL P,H,I
30 O=36.167:Q=1.67988:X=.665452:Y=.746441
40 P=103.23389#:I=.9877101182937622#:H=.8756536421393655#:GOTO 60
50 P=114.94513#:I=.979587:H=.813027
60 A(7)=3.141593:A(8)=0
70 PRINT"CHOOSE DATA NEEDED: 1=QTH, 2=SATELLITE, 3=ORBIT, 4=NONE"
80 INPUT R:ON R GOTO 90,130,240,290
90 INPUT "NORTH LATITUDE (DECIMAL DEGREES)";O
100 INPUT"WEST LONGITUDE(DECIMAL DEGREES)";Q
110 Q=Q*A(7)/180:A(1)=O*A(7)/180:GOSUB 750
120 X=A(1):Y=A(2):GOTO 70
130 INPUT"OSCAR 7 OR 8,OR 1 FOR OTHER ";F
140 IF F=1 THEN 190
150 IF F=7 THEN 50
160 IF F=8 THEN 70
170 IF F<7 THEN 70
180 IF F>8 THEN 70
190 INPUT"PERIOD OF SATELLITE(DECIMAL MINUTES)";P
200 INPUT "INCLINATION OF ORBIT(DEGREES)";I
210 INPUT"HEIGHT OF ORBIT(STATUTE MILES)";H
220 H=3957/(3957+H):A(1)=I*A(7)/180:GOSUB 750
230 I=A(1):GOTO 70
240 INPUT"REFERENCE ORBIT NUMBER";N
250 INPUT"EQX LONGITUDE";S
260 INPUT"EQX TIME(HR,MIN)";T,R
270 INPUT"TIME INCREMENT OF READOUT IN MINUTES.";Z1
280 S=S*A(7)/180:T=T+(R/60)
290 CLS
300 GOSUB 1050
310 FOR E=0 TO INT(P) STEP Z1:A(1)=2*A(7)*E/P:GOSUB 750
320 B=A(1):C=A(2)
330 K=B*I:A(1)=K:GOSUB 850
340 M=A(2):A(1)=M:GOSUB 750
350 L=A(2):A(1)=C/L:GOSUB 850
360 IF M<0 THEN A(2)=-1*(A(2)+A(7))
370 U=E/229.183+S+(A(7)/2-A(2))
380 IF U>(2*A(7)) THEN U=U-2*A(7)
390 A(1)=U-Q:GOSUB 750
400 F=A(2):A(9)=A(1)
410 Z=(X*K)+(Y*L*F):A(1)=Z:GOSUB 850
420 D=A(7)/2-A(2):A(1)=D:GOSUB 750
430 G=A(1)
440 IF ABS(G)<ABS(Z-H) GOTO 470
450 A(1)=(Z-H)/G:GOSUB 920
460 V=A(1):GOTO 500
470 A(1)=G/(Z-H):GOSUB 920
480 IF A(1)<0 THEN V=A(7)/(-2)-A(1):GOTO 500
490 V=A(7)/2-A(1)
500 A(1)=(K-(X*Z))/(Y*G):GOSUB 850
510 W=A(7)/2-A(2)
520 IF A(9)>0 THEN W=2*A(7)-W
530 A(1)=INT(T):A(2)=E+INT((T-A(1))*60)
540 IF A(2)<60 GOTO 560
550 A(1)=A(1)+1:A(2)=A(2)-60:IF A(1)=24 THEN A(1)=A(1)-24:GOTO 540
560 A(3)=INT(W*1800/A(7)+.5)/10:A(4)=INT(V*1800/A(7)+.5)/10
570 A(5)=INT(M*180/A(7)+.5):A(6)=INT(U*180/A(7)+.5)
580 IF A(4)<-3 THEN 730
590 H1$=STR$(A(1)):M1$=STR$(A(2))
600 IF A(1)<10 THEN H1$="0"+ RIGHT$(H1$,1)
610 H1$=RIGHT$(H1$,2)
620 IF A(2)<10 THEN M1$="0"+ RIGHT$(M1$,1)
630 M1$=RIGHT$(M1$,2)
640 A$="##:":B$="##":C$="###.#":D$="###.#":E$="##":F$="###":G$="###"
650 PRINT USING E$;E;
660 PRINT TAB(4);H1$;":";
670 PRINT TAB(7);M1$;
680 PRINT TAB(17) USING C$;A(3);
690 PRINT TAB(30) USING D$;A(4);
700 PRINT TAB(48) USING F$;A(5);
710 PRINT TAB(53) USING G$;A(6)
720 A(10)=A(10)+1
730 NEXT E
740 END
750 IF ABS(A(1))<(2*A(7)) GOTO 780
760 A(1)=A(1)/(2*A(7):A(6)=1:IF A(1)<0 THEN A(6)=-L:A(1)=ABS(A(1))
770 A(1)=(A(1))-INT(A(1))*2*A(7)*A(6):A(6)=1
780 A(4)=1:A(2)=1:A(3)=A(1):A(5)=A(1)*A(1)
790 FOR R=2 TO 30
800 A(4)=-1*A(4)*A(5)/((2*R-2)*(2*R-3))
810 IF ABS(A(4))<1E-08 THEN RETURN
820 A(3)=-1*A(3)*A(5)/((2*R-2)*(2*R-1 ))
830 A(1)=A(1)+A(3):A(2)=A(2)+A(4):NEXT R
840 RETURN
850 A(8)=0:A(6)=1:IF ABS(A(1))<.9 GOTO 920
860 IF (1)<0 THEN A(6)=-1:A(1)=ABS(A(1))
870 A(1)=1-A(1)*A(1):IF A(1)<=0 THEN A(1)=0:A(8)=1:GOTO 920
880 A(2)=A(1)*3
890 A(3)=(A(1)/A(2)+A(2))/2
900 IF A(3)<>A(2) THEN A(2)=A(3):GOTO 890
910 A(1)=A(6)*A(3):A(8)=1
920 A(2)=A(1):IF ABS(A(1))<.02 GOTO 1000
930 A(3)=A(1):A(4)=A(1):A(5)=A(1)*A(1)
940 FOR R=1 TO 50
950 A(3)=-1*A(3)*A(5)
960 A(4)=A(4)*A(5)*(2*R-1)/(2*R)
970 IF ABS(A(4))<9.999999E-10 GOTO 1000
980 A(1)=A(1)+A(3)/(2*R+1):A(2)=A(2)+A(4)/(2*R+1)
990 NEXT R
1000 IF A(8)=0 THEN RETURN
1010 A(8)=0
1020 IF A(6)<0 THEN A(2)=A(7)/(-2)-A(2):A(6)=1:RETURN
1030 A(2)=A(7)/2-A(2)
1040 RETURN
1050 A(1)=INT(O*10+.5)/10:A(2)=INT(Q*1800/A(7)+.5)/10
1060 A(3)=INT(S*1800/A(7)+.5)/10:A(4)=INT(T)
1070 A(5)=INT((T-A(4))*60+.5)
1080 PRINT"QTH";A(1);"N.LAT";A(2);"W.LONG","SAT PD";P;"MIN"
1090 PRINT"ORBIT";N;"EQX";A(3);"W.LON AT";A(4);":";A(5)
1100 PRINT"# TIME";TAB(17);"AZ-BERINGS-EL";TAB(49);"LAT LON"